﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;
using DongDong.Common;
public partial class Include_GRZX : System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {

            Client objClient = Client.GetCurrent();
            if (objClient == null)
                return;
            litUserName.Text = objClient.Username;
            StringBuilder SortNava = new StringBuilder();
            StringBuilder LeftNava = new StringBuilder();
            YHDR_CDSX_KJDH objYHDR_CDSX_KJDH = YHDR_CDSX_KJDH.GetByAddUserID(objClient.ID);
            if (!string.IsNullOrEmpty(objYHDR_CDSX_KJDH.CDSX))
            {
                string WXXY = objYHDR_CDSX_KJDH.CDSX.Split(';')[0];
                if (!string.IsNullOrEmpty(WXXY))
                {
                    string[] Navas = WXXY.Split(',');
                    SortNava.Append("<select><option value='1' selected='selected'>1</option><option value='2'>2</option><option value='3'>3</option><option value='4'>4</option></select>" + "&nbsp;<span id='DHSPAN1'>" + Navas[0] + "</span>  <br />");
                    SortNava.Append("<select><option value='1' >1</option><option value='2' selected='selected'>2</option><option value='3'>3</option><option value='4'>4</option></select>" + "&nbsp;<span id='DHSPAN2'>" + Navas[1] + "</span> <br />");
                    SortNava.Append("<select><option value='1' >1</option><option value='2'>2</option><option value='3' selected='selected'>3</option><option value='4'>4</option></select>" + "&nbsp;<span id='DHSPAN3'>" + Navas[2] + "</span> <br />");
                    SortNava.Append("<select><option value='1'>1</option><option value='2'>2</option><option value='3'>3</option><option value='4'  selected='selected'>4</option></select>" + "&nbsp;<span id='DHSPAN4'>" + Navas[3] + "</span> <br />");

                    String XYXXGL = "<div id='XYXXGL'><div class='rootnava'>学员学习管理<img alt='关闭'style='margin-bottom: -3px' src='/Scripts/jquery-easyui-1.3.1/themes/icons/edit_remove.png' width='16px' height='16px' /></div>" +
                         "<div><div class='parentnava'> <img alt='关闭' style='margin-bottom: -3px' src='/Scripts/jquery-easyui-1.3.1/themes/icons/edit_remove.png' width='16px' height='16px' />培训</div>" +
                             "<div><a class='colf3' href='/GRZX/WSXY/PX.aspx'>培训中的课程</a><br /><a class='colf3' href='/GRZX/WSXY/PX.aspx'>已完成的课程</a></div>" +
                             "<div class='parentnava'><img alt='关闭' style='margin-bottom: -3px' src='/Scripts/jquery-easyui-1.3.1/themes/icons/edit_remove.png' width='16px' height='16px' />辅导</div>" +
                             "<div><a class='colf3' href='/GRZX/WSXY/FD.aspx'>培训中的辅导</a><br /> <a class='colf3' href='/GRZX/WSXY/FD.aspx'>已完成的辅导</a></div>" +
                         "</div></div>";
                    String BMXXGL = "<div id='BMXXGL'><div class='rootnava' >报名信息管理<img alt='关闭' style='margin-bottom: -3px' src='/Scripts/jquery-easyui-1.3.1/themes/icons/edit_remove.png' width='16px' height='16px' /></div>" +
                        "<div><a class='colf3' href='/GRZX/WSXY/GRBMXX.aspx'>常用个人</a><br /><a class='colf3' href='/GRZX/WSXY/QYBMXX.aspx'>常用企业</a></div></div>";
                    String PSDZ = "<div  id='PSDZGL'><div class='rootnava'>配送地址管理<img alt='关闭' style='margin-bottom: -3px' src='/Scripts/jquery-easyui-1.3.1/themes/icons/edit_remove.png' width='16px' height='16px' /></div>" +
                        "<div><a class='colf3' href='/GRZX/WSXY/PSDZ.aspx'>常用配送地址</a></div></div>";
                    String KFFW = "<div id='KFFW'><div class='rootnava' >客服服务<img alt='关闭' style='margin-bottom: -3px' src='/Scripts/jquery-easyui-1.3.1/themes/icons/edit_remove.png' width='16px' height='16px' /></div>" +
                        "<div><div class='parentnava'><img alt='关闭' style='margin-bottom: -3px' src='/Scripts/jquery-easyui-1.3.1/themes/icons/edit_remove.png' width='16px' height='16px' />投诉</div>" +
                            "<div><a class='colf3' href='#'>培训投诉</a><br /><a class='colf3' href='#'>辅导投诉</a></div>" +
                            "<div class='parentnava1'><a class='colf3' href='/GRZX/WSXY/WGXX.aspx'>违规信息</a></div>" +
                            "<div class='parentnava1'><a class='colf3' href='/GRZX/WSXY/JYZX.aspx'>建议咨询</a> </div>" +
                            "<div class='parentnava1'><a class='colf3' href='/GRZX/WSXY/JYZX.aspx'>联系客服</a></div>" +
                        "</div></div>";
                    foreach (var s in Navas)
                    {
                        switch (s)
                        {
                            case "学员学习管理":
                                LeftNava.Append(XYXXGL);
                                break;
                            case "报名信息管理":
                                LeftNava.Append(BMXXGL);
                                break;
                            case "配送地址管理":
                                LeftNava.Append(PSDZ);
                                break;
                            case "客服服务":
                                LeftNava.Append(KFFW);
                                break;
                        }

                    }
                    litLeftNava.Text = LeftNava.ToString();
                    litNavaSort.Text = SortNava.ToString();
                }
            }
        }

    }
    public void SetMeta(string pageTitle, string keywords, string description)
    {
        Page.Title = pageTitle;
        if (keywords == null)
            keywords = "";

        if (description == null)
            description = "";

        Misc.SetMetaValues(this.Page.Header, "Keywords", keywords);
        Misc.SetMetaValues(this.Page.Header, "Description", description);
    }
}
